Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(package): fix some warnings/errors #14997

Closed
wants to merge 2 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Aug 6, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Chore.

What is the current behavior? (You can also link to an open issue here)
Warnings (or even errors), when running some build commands (e.g. grunt package).

What is the new behavior (if this is a feature change)?
No warnings or errors, when running build commands.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

Other information:
chore(package): fix some warnings/errors

Related to #14952. Fixed the following warnings/errors:

  1. Warning: Closure Compiler complained about /* @this */ (annotations in non-JSDoc cooments).
    Fixed by changing /* @this */ to /** @this */.
  2. Warning: Dgeni complaines about /** @this */ (invalid tags found).
    Fixed by adding an empty this tag definition in docs/config/tag-defs/.
  3. Error: ESLint complained about CRLF linebreaks in build/docs/examples/. These are generated by dgeni and (apparently) use the system's default linebreak (i.e. CRLF on Windows).
    Fixed by disabling the linebreak-style rule for build/docs/examples/.

Related to angular#14952. Fixed the following warnings/errors:

1. **Warning**: Closure Compiler complained about `/* @this */` (annotations in non-JSDoc cooments).
   Fixed by changing `/* @this */` to `/** @this */`.

2. **Warning**: Dgeni complaines about `/** @this */` (invalid tags found).
   Fixed by adding an empty `this` tag definition in `docs/config/tag-defs/`.

3. **Error**: ESLint complained about CRLF linebreaks in `build/docs/examples/`. These are generated
   by dgeni and (apparently) use the system's default linebreak (i.e. CRLF on Windows).
   Fixed by disabling the `linebreak-style` rule for `build/docs/examples/`.
@gkalpak gkalpak force-pushed the chore-eslint-fix-warnings branch from f5b7a14 to 78cc2e6 Compare August 6, 2016 15:36
'use strict';

module.exports = {
name: 'this'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore: true I think additional bonus points!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding that and I get a ton of warnings like:

warn:    Missing container document: "$anchorScrollProvider" - doc "$anchorScrollProvider#method:disableAutoScrolling" (method)  - from file "ng/anchorScroll.js" - starting at line 16, ending at line 28
warn:    Missing container document: "$cacheFactory" - doc "$cacheFactory#method:info" (method)  - from file "ng/cacheFactory.js" - starting at line 320, ending at line 328
...
warn:    Missing service "module:ng.service:$anchorScrollProvider
@this" for provider - doc "module:ng.provider:$anchorScrollProvider
@this" (provider)  - from file "ng/anchorScroll.js" - starting at line 3, ending at line 11
warn:    Missing service "module:ng.service:$controllerProvider
@this" for provider - doc "module:ng.provider:$controllerProvider
@this" (provider)  - from file "ng/controller.js" - starting at line 16, ending at line 27
...
warn:    Invalid link (does not match any doc): "ngRoute.$routeProvider" - doc "index" (overview)  - from file "api/index.ngdoc" - starting at line 1
warn:    Invalid link (does not match any doc): "ngAria.$ariaProvider" - doc "index" (overview)  - from file "api/index.ngdoc" - starting at line 1
...

And also couple of errors at the end:

error:   Error: ENOENT: no such file or directory, open 'C:\Datafiles\Dev\AngularJS\angular.js\build\docs\partials\api\ng\provider\$anchorScrollProvider
@this.html'
    at Error (native)
error:   Error processing docs:  Error: ENOENT: no such file or directory, open 'C:\Datafiles\Dev\AngularJS\angular.js\build\docs\partials\api\ng\provider\$anchorScrollProvider
@this.html'
    at Error (native)

Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, @petebacondarwin said:

If a tag is ignored then it appears verbatim inside the content of the previous tag
So the following:

 * @ngdoc provider
 * @name $anchorScrollProvider
 * @this
 * @description ...

Meant that the name of the doc was $anchorScrollProvider\n@this
Happy to leave the ignore: true out

@gkalpak gkalpak closed this in ec565dd Aug 8, 2016
gkalpak added a commit that referenced this pull request Aug 8, 2016
Related to #14952. Fixed the following warnings/errors:

1. **Warning**: Closure Compiler complained about `/* @this */` (annotations in non-JSDoc comments).
   Fixed by changing `/* @this */` to `/** @this */`.

2. **Warning**: Dgeni complained about `/** @this */` (invalid tags found).
   Fixed by adding an empty `this` tag definition in `docs/config/tag-defs/`.

3. **Error**: ESLint complained about CRLF linebreaks in `build/docs/examples/`. These are generated
   by dgeni and (apparently) use the system's default linebreak (e.g. CRLF on Windows).
   Fixed by disabling the `linebreak-style` rule for `build/docs/examples/`.

Closes #14997
@gkalpak gkalpak deleted the chore-eslint-fix-warnings branch August 8, 2016 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants